<template>
  <div style="height: 100%">
    <div id="app">
      <router-view />
    </div>
    <Filings />
  </div>
</template>

<script>
import Filings from '@/views/common/Filings'
export default {
  name: 'App',
  components: { Filings },
  metaInfo() {
    return {
      title: this.$store.state.settings.dynamicTitle && this.$store.state.settings.title,
      titleTemplate: title => {
        return title ? `${title} - ${process.env.VUE_APP_TITLE}` : process.env.VUE_APP_TITLE
      }
    }
  },
  created() {
    const userInfo = JSON.parse(localStorage.getItem('adminUserInfo'))
    if (window.performance.navigation.type === 1 && userInfo) {
      this.$ws.createWS(userInfo.id)
    }
  },
  beforeDestroy() {
    this.$ws.$ws.close()
  }
}
</script>
<style lang="less">
  /*reset*/
  html, body, div, span, applet, object, iframe,
  h1, h2, h3, h4, h5, h6, p, blockquote, pre,
  a, abbr, acronym, address, big, cite, code,
  del, dfn, em, img, ins, kbd, q, s, samp,
  small, strike, strong, sub, sup, tt, var,
  b, u, i, center,
  dl, dt, dd, ol, ul, li,
  fieldset, form, label, legend,
  caption, tbody, tfoot, thead, tr, th, td,
  article, aside, canvas, details, embed,
  figure, figcaption, footer, header,
  menu, nav, output, ruby, section, summary,
  time, mark, audio, video {
    margin: 0;
    padding: 0;
    border: 0;
    font: inherit;
  }
  body{
    font-family:Arial,"STHeiti", Helvetica, sans-serif;
    background:#efefef;
    font-size:14px;
    color:#444!important;
    min-height:100vh;
    width:100%;
    overflow-x: hidden;
    height: 100%;
    -webkit-overflow-x: hidden;
    -webkit-tap-highlight-color: transparent;
  }

  table{
    border-collapse:collapse;
    border-spacing:0
  }
  fieldset, img{
    border:0
  }
  legend{
    display:none
  }
  .p-yellow {
    color: #d8cf10;
    display: inline-block;
  }
  .p-green {
    color: #0fd547;
    display: inline-block;
  }
  .p-red {
    display: inline-block;
    color: red;
  }
  ol, ul{
    list-style:none
  }
  caption, th{
    text-align:left
  }
  h1, h2, h3, h4, h5, h6{
    font-size:100%;
    font-weight:normal
  }
  q:before, q:after{
    content:''
  }
  abbr, acronym{
    border:0
  }
  a{
    text-decoration:none;
  }
  html{-webkit-text-size-adjust:none;width:100%;height:100% } /*????iphone??safari????????????*/
  input[type="text"], input[type="button"], input[type="submit"], input[type="search"]{
    -webkit-appearance:none;
    border-radius:0;
  }
  /*************其他内容*************/
  #app {
    font-family: 'Avenir', Helvetica, Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    width:100%;
    overflow-x: hidden;
    -webkit-overflow-x: hidden;
    color: #444;
  }

  h1, h2 {
    font-weight: normal;
  }
  a {
    color: #444;
  }
  strong {
    font-weight: bold;
    color: black;
  }
  ::-webkit-scrollbar {
    width: 6px;
    height: 6px;
  }
  ::-webkit-scrollbar-thumb {
    border-radius: 10px;
    background-color: skyblue;
    background-image: -webkit-linear-gradient(
      45deg,
      rgba(255, 255, 255, 0.2) 25%,
      transparent 25%,
      transparent 50%,
      rgba(255, 255, 255, 0.2) 50%,
      rgba(255, 255, 255, 0.2) 75%,
      transparent 75%,
      transparent
    );
  }
  ::-webkit-scrollbar-track {
    box-shadow   : inset 0 0 5px rgba(0, 0, 0, 0.2);
    background   : #ededed;
    border-radius: 10px;
  }
</style>
